package sctu.edu.java.year2016.team04.baiyunfei.day20160630;

import javax.swing.*;
import java.awt.*;

/**
 * Created by DE on 2016/6/30.
 */
public class JFExample_1 extends JFrame{
    public void CreateJFrame(String title){
        JFrame jf = new JFrame(title);
        Container container=jf.getContentPane();
JLabel jl =new JLabel("有点晕");
        jl.setFont(new Font("STXingkai",Font.PLAIN,78));//STXingkai=字型 ITALIC=斜体
jl.setHorizontalAlignment(SwingConstants.CENTER);
        container.add(jl);
        container.setBackground(Color.white);
        jf.setVisible(true);
        jf.setSize(500, 1000);
        jf.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
    }

    public static void main(String[] args) {
        new JFExample_1().CreateJFrame("创建一个JFrame窗体");
    }
}
